home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.june.archive / 000029_crash!kirk.safb.af.mil!BWILLS_Tue, 8 Jun 93 17:50:33 PST.msg < prev    next >
Text File  |  1993-08-31  |  2KB  |  68 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Tue, 8 Jun 93 17:50:33 PST
  3. Received: from kirk.safb.af.mil by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #15) id m0o3Cg5-0001SpC; Tue, 8 Jun 93 16:02 PDT
  5. Message-Id: <m0o3Cg5-0001SpC@crash.cts.com>
  6. Date: 8 Jun 93 17:59:00 CST
  7. From: "Barry D. Wills" <BWILLS@kirk.safb.af.mil>
  8. To: "amigae" <amigae@bkhouse.cts.com>
  9. Subject: re:  How do I use E?
  10.  
  11. Peter Dilly, in a message you said:
  12. /*
  13.  
  14. Now first I know I forogt a \n after the \c on the first WriteF that
  15. gives
  16. the result to variable a. So put it in there.
  17.  
  18. Ok in C im in the cli running the executable.
  19. Enter something
  20. so I type ! and return
  21. You entered !
  22. Enter something else
  23. so I type @ and return
  24. You now entered @
  25.  
  26. Ok in E im in the cli and then EC the example.e file and run the
  27. executable.
  28. Enter something
  29. so I type ! and return
  30. You entered !
  31. Enter something else
  32. You now entered
  33. ^^^^ In E it just flies through skipping the next attempt to get
  34. variable. After the first Return is pressed it goes flippo.
  35.  
  36.  
  37. ------------------------------
  38. aga@qedbbs.com (Peter Dilley)  or  qed!aga
  39. The QED BBS -- (310)420-9327
  40.  
  41. */
  42.  
  43.  
  44. PROC main()
  45. DEF a,b
  46.         WriteF ('Enter something > ')
  47.         a := Inp (stdout) /* in C it seems to be stdin */
  48.  
  49.         /*---------------------------------------------------------------*/
  50.         /* Try this:                                                     */
  51.  
  52.         WHILE Inp (stdout) <> 10 DO NOP  /* Flush the input buffer. */
  53.  
  54.         /* If you only want to get one character, do this.  10 is the    */
  55.         /* decimal ascii code for the line-feed character, which is left */
  56.         /* in the input buffer after pressing return.   This gets rid of */
  57.         /* it.  Incidently, Peter, you can Inp() a whole string at a     */
  58.         /* time using a loop, checking the value to tell when the end of */
  59.         /* input has been reached.                                       */
  60.         /*---------------------------------------------------------------*/
  61.  
  62.         WriteF ('You entered \c\n', a)
  63.  
  64.         WriteF ('Enter something else > ')
  65.         b := Inp (stdout)  /* ditto */
  66.         WHILE Inp (stdout) <> 10 DO NOP  /* Flush the input buffer. */
  67.         WriteF ('You now entered \c\n', b)
  68. ENDPROC